<?php

include_once 'connection.php';

$result = mysql_query('SELECT id, name FROM province');
if (mysql_num_rows($result) > 0) {
    while ($obj = mysql_fetch_object($result)) {
        $arr[] = $obj;
    }
}
Echo '{rows:' . json_encode($arr) . '}';
?>
